<template>
	<view class="content">
		<view class="score-view">
			<view class="example-title">反馈及时</view>
			<view class="example-body">
				<uni-rate :value="star" disabled=""></uni-rate>
			</view>
			<view class="example-title">处理结果</view>
			<view class="example-body">
				<uni-rate :value="timeStar" disabled=""/>
			</view>
		</view>
		<view class="complain_content">
			<view class="title">
				我还想说:
			</view>
			<view class="text-content">{{content}}</view>
		</view>
	</view>
</template>

<script>
	import uniRate from '@/components/uni-rate/uni-rate.vue'
	export default {
		components: {
			uniRate
		},
		data() {
			return {
				content:'',
				star:0,
				timeStar:0,
				complainId :''
			}
		},
		onLoad(option) {
			this.complainId = option.complainId;
			this.getDataList();
			
		},
		methods: {
			getDataList() {
				uni.showLoading({
					title: '加载中...',
					mask: false
				});
				uni.request({
					url: this.websiteUrl + 'appim/getComplaintDetail',
					method: 'GET',
					data: {"COMPLAINT_ID" : this.complainId},
					success: res => {
						console.log(res);
						var detail = res.data.data;
						this.star = parseInt(detail.STAR);
						this.timeStar = parseInt(detail.TIMESTAR);
						this.content = detail.RECONTENT;
					},
					fail: () => {},
					complete: () => {
						uni.hideLoading();
					}
				});
			},
			onChange(e) {
				console.log('rate发生改变:' + JSON.stringify(e))
			}
		},
	}
</script>

<style>
	page {
		font-size: 16px;
	}
	.content {
		background-color: #FFFFFF;
	}
	
	.example-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 32upx;
		color: #464e52;
		padding: 10upx 30upx 10upx 50upx;
		margin-top: 20upx;
		position: relative;
		background-color: #fdfdfd;
		/* border-bottom: 1px #f5f5f5 solid */
	}
	
	.example-title__after {
		position: relative;
		color: #031e3c
	}
	
	.example-title:after {
		content: '';
		position: absolute;
		left: 30upx;
		margin: auto;
		top: 0;
		bottom: 0;
		width: 6upx;
		height: 32upx;
		background-color: #19c99a;
	}
	
	.example .example-title {
		margin: 40upx 0
	}
	
	.example-body {
		padding: 30upx;
		background: #fff;
		padding: 0 14px;
	}
	
	.complain_content {
		padding: 14px;
	}
	.title {
		margin: 10px 0;
	}
</style>
